<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>UCenter Administrator's Control Panel</title>
        <link rel="stylesheet" href="css/common.css" type="text/css" media="all" />
        <script type="text/javascript">
            function delit(id){
                document.getElementById("opid").value = id;
                document.opform.submit();
            }
        </script>
    </head>
    <body>
        <div id="append"></div>


        <div class="container"><h2 class="admintitle">模块管理</h2>
            <div class="hastabmenu">
                <ul class="tabmenu">
                    <li id="srchuserbtn" class="tabcurrent"><a href="index.php?c=ModuleManage">所有模块</a></li>
                    <li id="adduserbtn"><a href="index.php?c=ModuleManage&a=AddModule">添加模块</a></li>
                </ul>
                <div id="srchuserdiv" class="tabcontentcur">
                    <form name="opform" action="index.php?c=ModuleManage&a=DelModule" method="post">
                        <input type="hidden" id="opid" name="opid" value="0" />
                        <table width="100%">
                            <tr>
                                <td>模块id:</td>
                                <td>模块名</td>
                                <td>操作</td>
                            </tr>
                            <?php
                            if (!empty($list) && is_array($list)) {
                                foreach ($list as $val) {
                                    $id = $val['id'];
                                    $name = $val['name'];
                                    echo '<tr><td>'.$id.'</td>
                                              <td>'.$name.'</td>
                                              <td><input type="button" name="delete" onclick="delit('.$id.')" value="删除" /></td></tr>';
                                }
                            }
                            ?>
                        </table>
                    </form>
                </div>
            </div>

            <br />
            <?php
                if(empty($list)){
            ?>
            <div class="mainbox">
                <div class="note">
                    <p class="i">目前没有相关数据!</p>
                </div>
            </div>
            <?php
                }
            ?>
        </div>


    </body>
</html>
